home *** CD-ROM | disk | FTP | other *** search
/ SGI Performance Co-Pilot 1.3 / SGI Performance Co-Pilot 1.3.iso / dist / dist6.4 / pcp.idb / usr / include / pcp / util.h.z / util.h
C/C++ Source or Header  |  1997-04-03  |  2KB  |  74 lines

  1. /*
  2.  * Copyright (c) 1994 Silicon Graphics, Inc.
  3.  * ALL RIGHTS RESERVED.
  4.  *
  5.  * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND
  6.  * Use, duplication or disclosure by the Government is subject to
  7.  * restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph
  8.  * (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
  9.  * at DFARS 252.227-7013 and/or similar or successor clauses in the FAR,
  10.  * or the DOD or NASA FAR Supplement.  Contractor/manufacturer is Silicon
  11.  * Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
  12.  *
  13.  * THIS SOFTWARE CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION OF
  14.  * SILICON GRAPHICS, INC.  ANY DUPLICATION, MODIFICATION, DISTRIBUTION, OR
  15.  * DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN
  16.  * PERMISSION OF SILICON GRAPHICS, INC.
  17.  */
  18.  
  19. /* $Id: util.h,v 2.7 1997/03/21 08:29:01 kenmcd Exp $ */
  20.  
  21. #ifndef _UTIL_H
  22. #define _UTIL_H
  23.  
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27.  
  28. /*
  29.  * These are useful utilities that are used in more than one place ...
  30.  * we use them, but don't necessarily want to support them at the PMAPI,
  31.  * hence they are outside libpcp
  32.  */
  33.  
  34. extern void printdesc(FILE *, pmDesc *);
  35.  
  36. /* access control routines */
  37. extern int _pmAccAddOp(unsigned int);
  38. extern int _pmAccAddHost(char *, unsigned int, unsigned int, int);
  39. extern int _pmAccAddClient(unsigned long, unsigned int *);
  40. extern void _pmAccDelClient(unsigned long);
  41.  
  42. extern void _pmAccDumpHosts(FILE *);
  43. extern int _pmAccSaveHosts(void);
  44. extern int _pmAccRestoreHosts(void);
  45. extern void _pmAccFreeSavedHosts(void);
  46.  
  47. /*
  48.  * process memory interface
  49.  * Fields are Kbytes.
  50.  * vxxx is virtual memory usage.
  51.  * pxxx is physical mem, pro-rated for sharing.
  52.  * TODO: sharing does not account for sprocs (in 5.3 at least)
  53.  */
  54. typedef struct {
  55.     unsigned long    ptxt;
  56.     unsigned long    vtxt;
  57.     unsigned long    pdat;
  58.     unsigned long    vdat;
  59.     unsigned long    pbss;
  60.     unsigned long    vbss;
  61.     unsigned long    pstk;
  62.     unsigned long    vstk;
  63.     unsigned long    pshm;
  64.     unsigned long    vshm;
  65. } _pmProcMem_t;
  66.  
  67. extern int _pmProcMem(int /*fd*/, _pmProcMem_t *);
  68.  
  69. #ifdef __cplusplus
  70. }
  71. #endif
  72.  
  73. #endif /* _UTIL_H */
  74.